/**
 * 
 * @fileOverview View control for the port list.
 * @author jmanero
 * 
 */

/** @ignore */
exports.callback = function(req, res) {
	model.Port.find(function(e) {
		model.Message.error(e);
	}).populate('device').run(function(e, ports) {
		model.Message.error(e);
		res.render('ports.jade', {
			pageTitle : 'Ports',
			ports : ports,
			pretty : true
		});
	});
};

/** @ignore */
exports.path = '/ports';

/** @ignore */
exports.method = 'get';
